﻿<?php 

$sql = "SELECT id, tag FROM tag WHERE table_id = $tableId AND item_id = $itemId ";

$resultTag = dbQuery($sql);
$countTag = dbNumRows($resultTag);



if ($countTag > 0) {
 ?>
 <div class="post-tags">Nhãn: 
 <?php for ($tagIndex = 0; $tagIndex < $countTag; $tagIndex++) { 
	$rowTag = dbFetchAssoc($resultTag);
 ?>
 <a href="javascript:viewTag('<?php echo $pcat; ?>', '<?php echo $rowTag['tag']; ?>', '<?php echo $rowTag['tag']; ?>');" rel="tag"><?php echo $rowTag['tag']; ?></a>&nbsp;&nbsp;
 <?php } ?>
</div>

 <?php } ?>
